import loader from "../Loader";

class Dialog extends Laya.Dialog{
    constructor () {
        super();

        this._$libraryName = "Honor";
        this._$viewType = "Dialog";
    }

    // createChildren () {
    //     super.createChildren();
    //     this._$needWaitForData = true;
    // }

    // loadScene (path) {
	// 	var url = path.indexOf(".") > -1 ? path : `${path}.scene`;
	// 	var view = Laya.loader.getRes(url);
	// 	if (view){
	// 		this.createView(view);
    //     } else {
    //         loader.showLoadingPage("Dialog");
	// 		Laya.loader.resetProgress();
	// 		var dialogLoader = new Laya.SceneLoader();
	// 		dialogLoader.on(/*laya.events.Event.PROGRESS*/"progress", loader, loader.onLoadProgress, ["Dialog", url]);
	// 		dialogLoader.on(/*laya.events.Event.COMPLETE*/"complete", this, this._onSceneLoaded, [url, loader, dialogLoader]);
	// 		dialogLoader.load(url);
	// 	}
    // }

    // createView (view) {
    //     super.createView(view);

    //     this.callLater(function () {
    //         this.event("DialogViewCreated");
    //     });
    // }
    
    // _onSceneLoaded (url, loader, dialogLoader) {
    //     dialogLoader.off(/*laya.events.Event.PROGRESS*/"progress", loader, loader.onLoadProgress);
    //     this.createView(Laya.Loader.getRes(url));
    //     loader.hideLoadingPage("Dialog");
    // }
}
Laya["Dialog"] = laya.ui["Dialog"] = Dialog;
export default Dialog;